docs: Clarify scope of gtk_widget_clear_template()
authorEmmanuele Bassi <ebassi@gnome.org>
Wed, 6 Jul 2022 12:04:22 +0000 (13:04 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 11 Jul 2022 17:24:37 +0000 (18:24 +0100)
The clear_template() method only clears the template children.

gtk/gtkwidget.c

index 432e10301b2607f1236546e83b0374822a8f49c3..8c943d15afbeaee6cf96dc94d5330916fdf6b911 100644 (file)
@@ -10974,10 +10974,13 @@ out:
  * @widget: the widget with a template
  * @widget_type: the type of the widget to finalize the template for
  *
- * Clears the template data for the given widget.
+ * Clears the template children for the given widget.
  *
  * This function is the opposite of [method@Gtk.Widget.init_template], and
- * it is used to clear all the template data from a widget instance.
+ * it is used to clear all the template children from a widget instance.
+ * If you bound a template child to a field in the instance structure, or
+ * in the instance private data structure, the field will be set to `NULL`
+ * after this function returns.
  *
  * You should call this function inside the `GObjectClass.dispose()`
  * implementation of any widget that called `gtk_widget_init_template()`.